1. Field of the Invention
The present invention relates to an image processing technology. More particularly, the present invention relates to evaluation of contrast value for an image.
2. Description of Related Art
Digital cameras have an auto focus function that ranges the distance between the object and the lens of the camera to adjust the focus length. Passive auto focus digital cameras do not need to range the distance, but utilizes the lens to capture an image that is digitalized and transformed into frequency domain. Values of the frequency domain of the digital image are critical values of resolution through which a focusing lens moves to change the focus length of an object distance so as to find a maximum critical value to present a clear picture.
A method to seek and fine focus a point is a developing issue for passive auto focus camera. The modern digital cameras use a specific digital signal processor (DSP) to process digital images. The DSP comprises a hardware component that detects and determines whether operations of auto focus are completed. However, this auto focus method still has some shortcomings. For example, if the object is a single piece of hair, the DSP generally subtracts the brightness value of each pixel of the image from one another, and calculates the average value of the differences or accumulates the differences so as to evaluate the contrast value in response to the average value or the sum. However, this method averages the contrast values by subtracting the brightness values of the pixels of the periphery of the hair, which abates specific weight in the contrast value of the pixels with large brightness differences. Therefore, the auto focus cannot be accurately and precisely performed.